﻿<%@ Page Title="Voorwaarden" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="Voorwaarden.aspx.cs" Inherits="Voorwaarden" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">
        #b
    {
        height: 189px;
    }
    #a
    {
        height: 1254px;
    }
    #b0
    {
        height: 102px;
    }
    #b1
    {
        height: 224px;
    }
    </style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Voorwaarden
    </h2>
    <div  id="a">
       
        <asp:Button ID="Button1" runat="server" onclick="ButtonAdd_Click" 
            Text="Voorwaarde toevoegen" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
       
        <asp:Button ID="ButtonVerwijderVoorwaarde" runat="server" onclick="ButtonVerwijder_Click" 
            Text="Laatste voorwaarde verwijderen" />
        <br />
        <br />
        <br />
       
        <asp:Panel ID="Panel1" runat="server" Height="66px" 
            Visible="False">
            <asp:DropDownList ID="DropDownListVanToepassingOp" runat="server" 
                CausesValidation="True" AutoPostBack="True" 
                onselectedindexchanged="DropDownList1_SelectedIndexChanged">
                <asp:ListItem Selected="True">Selecteer keuze</asp:ListItem>
                <asp:ListItem Value="product">Winkelkar bevat</asp:ListItem>
                <asp:ListItem Value="betaal">Betaalmethode</asp:ListItem>
                <asp:ListItem Value="verzend">Verzendformule</asp:ListItem>
            </asp:DropDownList>
            <br />
            <asp:DropDownList ID="DropDownListEnOf" runat="server">
                <asp:ListItem>EN</asp:ListItem>
                <asp:ListItem>OF</asp:ListItem>
            </asp:DropDownList>
            <br />
            </asp:Panel>
        <asp:Panel ID="PanelProduct" runat="server" Height="103px" Visible="False">
            <asp:DropDownList ID="DropDownList14" runat="server" AutoPostBack="True" 
                onselectedindexchanged="DropDownList14_SelectedIndexChanged">
                <asp:ListItem>Aantal stuks</asp:ListItem>
                <asp:ListItem>Bedrag</asp:ListItem>
                <asp:ListItem Value="alle">Alle producten met specifieke eigenschap</asp:ListItem>
            </asp:DropDownList>
            &nbsp;<asp:DropDownList ID="DropDownListAantal" runat="server" AutoPostBack="True" 
                CausesValidation="True" 
                onselectedindexchanged="DropDownList8_SelectedIndexChanged">
                <asp:ListItem>Exact</asp:ListItem>
                <asp:ListItem>Minstens</asp:ListItem>
                <asp:ListItem>Maximum</asp:ListItem>
            </asp:DropDownList>
            <asp:TextBox ID="TextBoxAantal" runat="server" Width="77px"></asp:TextBox>
            &nbsp;<asp:DropDownList ID="DropDownListCategory" runat="server" 
                AutoPostBack="True" CausesValidation="True" Height="36px" 
                onselectedindexchanged="DropDownListCategory_SelectedIndexChanged" 
                Width="206px">
            </asp:DropDownList>
            <asp:DropDownList ID="DropDownListMerken" runat="server" AutoPostBack="True" 
                Height="36px" Width="205px">
            </asp:DropDownList>
            <br />
            &nbsp;<br />&nbsp;<asp:DropDownList 
                ID="DropDownListProducten" runat="server" 
                AutoPostBack="True" CausesValidation="True" 
                onselectedindexchanged="DropDownListProducten_SelectedIndexChanged">
                <asp:ListItem>--</asp:ListItem>
            </asp:DropDownList>
            <asp:DropDownList ID="DropDownListEigenschappen" runat="server" 
                AutoPostBack="True" CausesValidation="True" 
                onselectedindexchanged="DropDownListEigenschappen_SelectedIndexChanged">
                <asp:ListItem>--</asp:ListItem>
            </asp:DropDownList>
            <asp:DropDownList ID="DropDownListWaarde" runat="server" 
                AutoPostBack="True" CausesValidation="True">
                <asp:ListItem>--</asp:ListItem>
            </asp:DropDownList>
            &nbsp;</asp:Panel>
        <br />
        <asp:Panel ID="PanelBetaalmethode" runat="server" Height="38px" Visible="False">
            <asp:DropDownList ID="DropDownListBetaalmethode" runat="server" AutoPostBack="True" 
                    CausesValidation="True" 
                    >
                <asp:ListItem>Selecteer keuze</asp:ListItem>
                <asp:ListItem>Specifiek product in winkelkar</asp:ListItem>
                <asp:ListItem Selected="True">Betaalmethode</asp:ListItem>
                <asp:ListItem>Verzendformule</asp:ListItem>
                <asp:ListItem>Totaalbedrag </asp:ListItem>
            </asp:DropDownList>
            <asp:DropDownList ID="DropDownListequal" runat="server">
                <asp:ListItem>gelijk aan</asp:ListItem>
                <asp:ListItem>niet gelijk aan</asp:ListItem>
            </asp:DropDownList>
            <asp:DropDownList ID="DropDownListpay" runat="server" 
                onselectedindexchanged="DropDownList3_SelectedIndexChanged">
                <asp:ListItem>Selecteer betaalmethode</asp:ListItem>
                <asp:ListItem>Cash</asp:ListItem>
                <asp:ListItem>Bankcontact</asp:ListItem>
                <asp:ListItem>Visa</asp:ListItem>
            </asp:DropDownList>
        </asp:Panel>

        <asp:Panel ID="PanelVerzendFormule" runat="server" Visible="False">
            
                <asp:DropDownList ID="DropDownList32" runat="server" AutoPostBack="True" 
                    CausesValidation="True">
                    <asp:ListItem>Selecteer keuze</asp:ListItem>
                    <asp:ListItem>Specifiek product in winkelkar</asp:ListItem>
                    <asp:ListItem>Totaalbedrag </asp:ListItem>
                    <asp:ListItem>Betaalmethode</asp:ListItem>
                    <asp:ListItem Selected="True">Verzendformule</asp:ListItem>
                </asp:DropDownList>
                &nbsp;<asp:DropDownList ID="DropDownListgelijkaan" runat="server">
                    <asp:ListItem>gelijk aan</asp:ListItem>
                    <asp:ListItem>niet gelijk aan</asp:ListItem>
                </asp:DropDownList>
                <br />
                <br />
                <asp:DropDownList ID="DropDownListverzendmodule" runat="server" 
                    onselectedindexchanged="DropDownList3_SelectedIndexChanged">
                    <asp:ListItem>Selecteer verzendformule</asp:ListItem>
                    <asp:ListItem>UPS</asp:ListItem>
                    <asp:ListItem>Afhaling</asp:ListItem>
                </asp:DropDownList>
&nbsp;<br />
                <br />
                <br />
        </asp:Panel>
        <br />
        <asp:Panel ID="Panel4" runat="server" Visible="False" Height="373px">
            <div id="b1">
                &nbsp;&nbsp;&nbsp;&nbsp;<br />
                <br />
                <br />
                &nbsp;<br />
                <asp:SqlDataSource ID="SqlDataSourceProductenCategorie" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                    
                    
                    
                    
                    SelectCommand="SELECT SpecificatieWaarden.waarde, Producten.* FROM Specificaties INNER JOIN ProductSpecificaties ON Specificaties.idSpecificatie = ProductSpecificaties.idSpecificatie INNER JOIN Producten ON ProductSpecificaties.idProduct = Producten.artikelNr INNER JOIN SpecificatieWaarden ON Specificaties.idSpecificatiewaarde = SpecificatieWaarden.idSpecificatieNamen WHERE (Specificaties.idSpecificatie = @parameter1)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownListCategory" Name="parameter1" 
                            PropertyName="SelectedValue" DefaultValue="" />
                    </SelectParameters>
                </asp:SqlDataSource>
                <br />
                <asp:SqlDataSource ID="SqlDataSourceProductenMerk" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                    SelectCommand="SELECT Producten.naam, Producten.artikelNr FROM Specificaties INNER JOIN ProductSpecificaties ON Specificaties.idSpecificatie = ProductSpecificaties.idSpecificatie INNER JOIN Producten ON ProductSpecificaties.idProduct = Producten.artikelNr WHERE (Specificaties.idSpecificatie = @parameter1)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownListCategory" DefaultValue="" 
                            Name="parameter1" PropertyName="SelectedValue" />
                    </SelectParameters>
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="SqlDataSourceCategorie" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                    
                    SelectCommand="SELECT SpecificatieWaarden.waarde, SpecificatieWaarden.idSpecificatieNamen FROM Specificaties INNER JOIN SpecificatieWaarden ON Specificaties.idSpecificatiewaarde = SpecificatieWaarden.idSpecificatieNamen WHERE (Specificaties.parent IS NULL)">
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="SqlDataSourceEigenschappen" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                    
                    
                    
                    SelectCommand="SELECT SpecificatieWaarden.waarde, SpecificatieWaarden.idSpecificatieNamen FROM Producten INNER JOIN ProductSpecificaties ON Producten.artikelNr = ProductSpecificaties.idProduct INNER JOIN Specificaties ON ProductSpecificaties.idSpecificatie = Specificaties.idSpecificatie INNER JOIN SpecificatieWaarden ON Specificaties.idSpecificatiewaarde = SpecificatieWaarden.idSpecificatieNamen WHERE (ProductSpecificaties.idProduct = @parameter1) AND (Specificaties.parent IS NOT NULL)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownListProducten" Name="parameter1" 
                            PropertyName="SelectedValue" />
                    </SelectParameters>
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="SqlDataSourceEigenschappen2" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                    
                    SelectCommand="SELECT Specificaties.specificatie FROM Specificaties INNER JOIN ProductSpecificaties ON Specificaties.idSpecificatie = ProductSpecificaties.idSpecificatie INNER JOIN Producten ON ProductSpecificaties.idProduct = Producten.artikelNr WHERE (ProductSpecificaties.idProduct = @parameter1) AND (Specificaties.parent = @parameter2)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownListProducten" Name="parameter1" 
                            PropertyName="SelectedValue" />
                        <asp:ControlParameter ControlID="DropDownListEigenschappen" Name="parameter2" 
                            PropertyName="SelectedValue" />
                    </SelectParameters>
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="SqlDataSourceMerken" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                    SelectCommand="SELECT * FROM [Merken]"></asp:SqlDataSource>
                <asp:SqlDataSource ID="SqlDataSourceAlleProducten" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                    SelectCommand="SELECT * FROM [Producten]"></asp:SqlDataSource>
                <asp:SqlDataSource ID="SqlDataSourceAlleEigenschappen" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:B2B_WebshopSQLConnectionString %>" 
                    SelectCommand="SELECT SpecificatieWaarden.waarde FROM Specificaties INNER JOIN SpecificatieWaarden ON Specificaties.idSpecificatiewaarde = SpecificatieWaarden.idSpecificatieNamen WHERE (Specificaties.parent IS NOT NULL)">
                </asp:SqlDataSource>
            </div>
        </asp:Panel>
   </div>
</asp:Content>
